const DQ_PROXY_ARRAY = [
  '/ancillaryservices',
  '/annex',
  '/asset-control',
  '/asset-screen',
  '/bff-eam',
  '/binlog-sync-es',
  '/center-monitor',
  '/cloud-monitor',
  '/combination',
  '/common-monitor',
  '/config-info',
  '/control',
  '/control-assetmanagement',
  '/cosco-monitor',
  '/data-common',
  '/datainfo',
  '/decomposition',
  '/demand-manage',
  '/dept-chart',
  '/dictionary',
  '/dqconfig',
  '/draw-info',
  '/eam-config',
  '/eam-fault',
  '/eam-ledger',
  '/eam-org',
  '/eam-search',
  '/eim',
  '/energy-carbon',
  '/energyStorage-monitor',
  '/energyStorage-screen',
  '/energystorage',
  '/energystorage-config',
  '/es',
  '/fanrun',
  '/forecast',
  '/iot-history',
  '/java_energy_storage_monitoring_platform',
  '/job',
  '/jobLog',
  '/ledger',
  '/load',
  '/log',
  '/management-analysis',
  '/management-screen',
  '/message',
  '/monitor-push',
  '/new-control',
  '/power',
  '/project-manage',
  '/purchaseinfo',
  '/pv-control',
  '/pvmonitor',
  '/pvmonitoring',
  '/report',
  '/rice-husk',
  '/run-log',
  '/settlement',
  '/signature',
  '/station-monitor',
  '/table-layout',
  '/dept-chart',
  '/tianji-transaction',
  '/user',
  '/user-behavior',
  '/workflow',
  '/workflow-interlayer',
  '/xiaoshouyi-config',
  '/sync-data',
  '/sync-data-generation-side',
  '/purchaseinfo-generation-side',
  '/obtain-huineng-data',
  '/huineng-to-influxdb',
  '/iot-calculate-handle',
  '/center-alert',
  '/iot-board',
  '/zero-carbon',
  '/operation-index',
  '/control-config',
  '/voice-announcements',
  '/center-electrical',
  '/center-yaoce-manage',
  '/wind-power-prediction',
  '/cloud-monitor/dept/deptInfo',
  '/eam-electric-quantity-info',
  '/clearing-settlement',
  '/reanalyze',
  '/disclosure',
  '/center-fan-exception',
  '/calculate-config',
  '/predictive',
  '/sz-center-com-loss',
  '/distribution',
  '/generation-common',
  '/task-management',
  '/gansudatang',
  '/sz-center-auto-notice',
  '/weather',
  '/sz-large-screen',
  '/monitor-service-manage',
  '/old-common-monitor',
  '/old-control-config',
  '/visit-register',
  '/implementation-access-tool',
  '/eam-service-support',
  '/material-manage',
  '/sap-data-lake',
  '/sz-center-ukey-manage',
  '/security-manage',
  '/annex/safe',
  '/configuration',
  '/eam-fmis',
  '/delivery-manage',
  '/plan-config',
  '/base-statement',
  '/ptas-reatil-trading',
  '/tianji-dynamic-grid',
  '/sz-auto-reset',
  '/grid-config',
  '/sz-auto-reset',
  '/grid-config',
  '/grid-data',
];

import { API_URL_OBJ } from './urlConfig';
const { CLIENT_ENV } = process.env;
const SERVER_URL = () => API_URL_OBJ[CLIENT_ENV] || API_URL_OBJ.release;

const DQ_PROXY = function () {
  let obj = {};
  DQ_PROXY_ARRAY.forEach((Url) => {
    obj[Url] = {
      target: `${SERVER_URL()}/`,
      changeOrigin: true,
      secure: false,
    };
  });
  obj['/text2audio'] = {
    target: `https://tsn.baidu.com/`,
    changeOrigin: true,
    secure: false,
  };
  return obj;
};

export default DQ_PROXY();
